-- slime_status
-- create by zhuangsl
-- 道具：指定冈布奥获得状态

return {
    apply = function(source, target, classId, value)
        -- 需要出战指定冈布奥
        local slimeId = ME.user.dbase:query("active_pet", 0)
        if not value[slimeId] then
            return false;
        end

        local condition = table.deepcopy(value[slimeId]);
        local status = condition.status;
        local endRound = condition.end_round;

        if endRound > 0 then
            condition.end_round = endRound + CombatM.getRound() + 1;
        end

        -- 同步一下回合数
        if condition.prop then
            condition["prop"][4] = condition.end_round;
        end

        condition.status = nil;

        CombatStatusM.applyStatus(target, status, condition);
    end,
};
